<%@ include file="../../common/includes/include-taglibs.jsp" %>

<html>
<head>
   <title>Texas Hold'em</title>
   <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
   <META HTTP-EQUIV="Cache-Control" CONTENT="max-age=0">
   <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
   <meta http-equiv="expires" content="0">
   <META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
   <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
   <base href="<%=request.getContextPath()%>"/>
   <%--<link rel="stylesheet" type="text/css" src="<%=request.getContextPath()%>/poker-views/css/poker.css"/>--%>
   <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/poker-views/css/poker.css"
         media="screen"/>
</head>

<body>
<c:out value="${texasTable.currentRound}"/>
<c:forEach items="${texasTable.players}" var="player" varStatus="status">
   <div id="player<c:out value="${status.index}"/>" class="player<c:out value="${status.index}"/>">
      <h3>
         <c:out value="${player.name != null}"/>
      </h3>
      <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${player.card1.imageFileName}"/>"
           alt="<c:out value="${player.card1.imageFileName}"/>"/>
      <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${player.card2.imageFileName}"/>"
           alt="<c:out value="${player.card2.imageFileName}"/>"/>

      <c:if test="${player.pokerHand != null}">
         <div id="playerHand">
            <span>rank:&nbsp;&nbsp;<c:out value="${player.pokerHand.rank}" default="none"/></span>
            <c:forEach items="${player.pokerHand.hand}" var="playerHandCard">
               <img class="miniPlayingCard"
                    src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${playerHandCard.imageFileName}"/>"
                    alt="<c:out value="${playerHandCard.imageFileName}"/>"/>
            </c:forEach>
         </div>
      </c:if>
   </div>
</c:forEach>
<div id="communityCards" class="communityCards">
   <h3>community cards</h3>
   <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${texasTable.communityCards.flop1.imageFileName}"/>"
        alt="<c:out value="${texasTable.communityCards.flop1.imageFileName}"/>"/>
   <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${texasTable.communityCards.flop2.imageFileName}"/>"
        alt="<c:out value="${texasTable.communityCards.flop2.imageFileName}"/>"/>
   <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${texasTable.communityCards.flop3.imageFileName}"/>"
        alt="<c:out value="${texasTable.communityCards.flop3.imageFileName}"/>"/>
   <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${texasTable.communityCards.turn.imageFileName}"/>"
        alt="<c:out value="${texasTable.communityCards.turn.imageFileName}"/>"/>
   <img src="<%=request.getContextPath()%>/poker-views/gfx/<c:out value="${texasTable.communityCards.river.imageFileName}"/>"
        alt="<c:out value="${texasTable.communityCards.river.imageFileName}"/>"/>
</div>

<div id="controls" class="controls">
   <form action="<%=request.getContextPath()%>/poker/texas-hold-em" method="post">
      <input type="hidden" name="action" value="nextRound"/>
      <input type="submit" value="Next Round"/>
   </form>
   <form action="<%=request.getContextPath()%>/poker/texas-hold-em" method="post">
      <input type="hidden" name="action" value="reset"/>
      <input type="submit" value="Reset"/>
   </form>
</div>
<%@ include file="includes/bottom.jsp" %>
</body>
</html>
